<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{ backdrop: 'static', keyboard: !saving }">
    <div class="modal-dialog ">
        <div class="modal-content">
            <form *ngIf="active" #editForm="ngForm" novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <h5 class="modal-title">
                        <span *ngIf="dataitemDetailUnit.id">修改字典分类: {{ dataitemDetailUnit.f_ItemName }}</span>
                        <span *ngIf="!dataitemDetailUnit.id">新增字典分类</span>
                    </h5>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>

                <div class="modal-body">
                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <label for="dataitemUnitDisplayName">名称*</label>
                        <input id="dataitemUnitDisplayName" #dataitemUnitDisplayName="ngModel" class="form-control" type="text" name="f_ItemName" [ngClass]="{ edited: dataitemDetailUnit.f_ItemName }" [(ngModel)]="dataitemDetailUnit.f_ItemName" required maxlength="128"/>
                        <validation-messages [formCtrl]="dataitemUnitDisplayName"></validation-messages>
                    </div>
                    <div class="form-group">
                        <label for="f_ItemCode">编号</label>
                        <input id="f_ItemCode" type="text" name="f_ItemCode" class="form-control" [ngClass]="{ edited: dataitemDetailUnit.f_ItemCode }" [(ngModel)]="dataitemDetailUnit.f_ItemCode" maxlength="24"  />
                    </div>
                    <div class="form-group">
                        <label for="f_ItemValue">值*</label>
                        <input id="f_ItemValue" type="text" name="f_ItemValue" class="form-control" [ngClass]="{ edited: dataitemDetailUnit.f_ItemValue }" [(ngModel)]="dataitemDetailUnit.f_ItemValue" required maxlength="24"  />
                    </div>
                    <!-- <div class="form-group">
                                <label for="sortCode">排序*</label>
                                <input id="sortCode" type="number" name="sortCode" class="form-control"  [ngClass]="{'edited': dataitemUnit.sortCode}" [(ngModel)]="dataitemUnit.sortCode" required maxlength="24">
                            </div> -->
                </div>

                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">
                        {{ 'Cancel' | localize }}
                    </button>
                    <button type="submit" class="btn btn-primary" [disabled]="!editForm.form.valid" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')">
                        <i class="fa fa-save"></i> <span>{{ 'Save' | localize }}</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>